Skip to content

Add update-docs skill for writing docs against the live Glific app - #685

Draft
rvignesh89 wants to merge 6 commits into
mainfrom
claude/glific-docs-update-skill-cb0216
Draft

rvignesh89 wants to merge 6 commits into
mainfrom
claude/glific-docs-update-skill-cb0216

Conversation

@rvignesh89

Copy link
Copy Markdown
Contributor

Summary

Adds the update-docs Claude Code skill (/update-docs). It writes, refreshes, reviews and restructures Glific docs. It checks the live production Glific app through a read-only playwright-cli browser session that redacts personal data from screenshots. It replaces the old documentation skill.

Skill: .claude/skills/update-docs/

  • scripts/gdocs.mjs has no dependencies and does the following:
    • preflight checks the env vars, the CLI, the browser launch, a guard canary (a test write that must be blocked), a redaction self-test, and the login.
    • It manages a single guarded session.
    • shot takes redacted screenshots and records their hashes in a manifest.
    • blocked lists write requests the guard stopped.
    • lint checks image provenance, /img/ refs and .md links.
  • Network guard:
    • It is installed before login.
    • It blocks every GraphQL mutation or subscription, and the queries that take edit locks (flowGet, flowRelease, simulatorGet, simulatorRelease).
    • It also blocks every other POST, PUT, PATCH or DELETE to the Glific host.
  • scripts/pw-guard-hook.sh (Bash pre/post hooks):
    • Direct playwright-cli calls must use the guarded session and an allow-listed set of commands.
    • When a write is blocked, the hook warns Claude so it stops and tells the user.
  • Workflow guides for refresh, new page, review and restructure, plus browsing.md and safety.md.

Style guides moved over from the old documentation skill

  • sections, style-writing, style-page and style-images now live in update-docs, and .claude/skills/documentation/ is removed.
  • The header guidance now matches the <table> block with Last Updated that most pages use.
  • The image guide requires gdocs shot and adds rules for framing and keeping filenames stable.
  • The refresh workflow accepts a glific-frontend PR as input.

Other

  • .gitignore: ignore .playwright-cli/ (session output, snapshots, redaction manifest).

Notes

  • This replaces Add Messages Overview tab to Data Analytics docs #684, which also included a Data Analytics page change. That change is reverted on this branch (ff469fe, then c6d7397), so the diff against main contains only the skill.
  • How it was tested: the skill ran end to end in a cloud session.
    • Preflight passed.
    • The guard blocked writes, including one the app sends on its own (marking messages as read).
    • Lint passed.
    • Screenshots came out redacted.
  • Environment requirements: GLIFIC_URL, GLIFIC_PHONE, GLIFIC_PASSWORD, playwright-cli with a matching Chromium, and moonshine.projecttech4dev.org in the allowed domains so the analytics dashboard loads.

🤖 Generated with Claude Code

https://claude.ai/code/session_01YZEqcwqazipcxQbcraCE5G


Generated by Claude Code

rvignesh89 and others added 4 commits October 10, 2026 11:17
/update-docs writes, refreshes, reviews and restructures docs against the
live Glific app from a cloud env with playwright-cli preinstalled.

- gdocs.mjs (zero-dep): preflight (env, CLI, browser, guard canary,
  redaction self-test, login), guarded session, redacted screenshots,
  blocked-write log, provenance/link lint
- Network guard blocks mutations, lock-taking queries (flowGet,
  simulatorGet) and non-GET REST writes before login
- Bash hooks restrict direct playwright-cli use to the guarded session
  and surface blocked writes so Claude stops and warns

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Move sections, style-writing, style-page and style-images into
update-docs and remove the old documentation skill.

- Header guidance now matches the <h3><table> block with Last Updated
  that most pages use, instead of the legacy ###** badge
- Image guide requires gdocs shot; adds framing and filename-stability rules
- Sections: _category_.json generated-index (not index.md), more routes
- Refresh workflow accepts a glific-frontend PR as input

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Document the new Messages Overview tab (Messages Exchanged card,
service message billing notice, Message Composition chart) and
replace the intro screenshot with one showing all four tabs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YZEqcwqazipcxQbcraCE5G
Keep this branch to the update-docs skill changes only.

This reverts commit ff469fe.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YZEqcwqazipcxQbcraCE5G
@coderabbitai

coderabbitai Bot commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

@github-actions
github-actions Bot temporarily deployed to pull request October 10, 2026 06:05 Inactive
The guard now lets flowGet (without isForced) and flowRelease through so
the flow editor can be documented. Everything else stays blocked:
Take Over (flowGet isForced), simulatorGet/Release, all mutations and
autosaved revisions. Allowed lock events are logged separately from
blocked ones; gdocs blocked flags a held lock and gdocs stop releases it
by loading the flow list. safety.md gains flow editor rules.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions
github-actions Bot temporarily deployed to pull request October 10, 2026 12:12 Inactive
gdocs.mjs -> glific-browser.mjs, pw-guard-hook.sh -> browser-guard-hook.sh.
Hook paths in .claude/settings.json and all skill docs updated.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

This branch was successfully deployed

1 active deployment
pull request — b690d9c5 Deployed Oct 10, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants